<template>
	<view>
		<view class="write-from pt-30">
			<view class="write-from-list">
				<view class="pl-30"><text class="red pr-10">*</text>任务名称</view>
				<view class="clear height-margin"></view>
				<view>
					<input class="uni-input input-box" placeholder="请输入内容"/>
				</view>
			</view>
			<view class="write-from-list">
				<view class="pl-30"><text class="red pr-10">*</text>公司名称</view>
				<view class="clear height-margin"></view>
				<view>
					<input class="uni-input input-box" placeholder="请输入内容"/>
				</view>
			</view>
			<view class="write-from-list">
				<view class="pl-30"><text class="red pr-10">*</text>联系人姓名</view>
				<view class="clear height-margin"></view>
				<view>
					<input class="uni-input input-box" placeholder="请输入内容"/>
				</view>
			</view>
			<view class="write-from-list">
				<view class="pl-30"><text class="red pr-10">*</text>联系电话</view>
				<view class="clear height-margin"></view>
				<view>
					<input class="uni-input input-box" placeholder="请输入内容"/>
				</view>
			</view>
			<view class="write-from-list">
				<view class="pl-30">备注内容</view>
				<view class="clear height-margin"></view>
				<view class="bg-fff p-10 h">
					<textarea placeholder-style="color:#999" placeholder="请输入内容" class="textarea-style"/>
				</view>
			</view>
			<view class="write-from-list">
				<view class="pl-30"><text class="red pr-10">*</text>验证码</view>
				<view class="clear height-margin"></view>
				<view class="relative">
					<view class="absolute btn-send" @tap="getCheckNum()">
						{{!codeTime?'获取验证码':codeTime+'s 重新获取'}}
					</view>
					<input class="uni-input input-box" placeholder="请输入验证码"/>
				</view>
			</view>
			<view class="write-from-list">
				<view class="pl-30">相关附件</view>
				<view class="clear height-margin"></view>
				<view class="bg-fff p-15 h pb-20">
					<view class=" bg-blue white r-5 f-26 left pt-20 pb-20 pl-30 pr-30">上传附件</view>
					<view class="clear h-10"></view>
					<view class="write-file-box">
						<view class="list-box" v-for="item in file">
							<view class="right btn-delete"></view>
							<view class="left text-line">
								{{item.name}}
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="clear h-120"></view>
		<view class="fixed-footer fixed z-99999 uni-center bg-blue white lh-90">
			确认保存
		</view>
	</view>
</template>

<script>
	export default {
		components: {
		},
		data() {
			return {
				codeTime:0,
				info: {
					name: '资产名称资产名称资产名称资产名称资产名称资产名称资产名称资产名称资产名称',
				},
				file:[
					{
						name:'1、啊是第三方法国红酒看啊是第三方法国红酒看sdag.ZIP'
					},
					{
						name:'2、宣称；声称；获得；要求；引起（注意）；索取；认领；断言；索要；夺走，夺去（生命）'
					}
				]
			}
		},
		onLoad(opt) {
			this.info.name = opt.name;
		},
		methods: {
			getCheckNum(){
				if(this.codeTime>0){
					uni.showToast({
						title: '不能重复获取',
						icon:"none"
					});
					return;
				}else{
					this.codeTime = 60
					let timer = setInterval(()=>{
					this.codeTime--;
					if(this.codeTime<1){
						clearInterval(timer);
						this.codeTime = 0
					}
					},1000)
				}
			}
		}
	}
</script>

<style>
</style>